---
layout: m1x_soap
title: Account Update
---

<h3><a name="giftcard_account.update-Module%3AGiftCardAPI"></a>Module: GiftCard API</h3>

<h4><a name="giftcard_account.update-Resource%3Agiftcardaccount"></a>Resource: giftcard_account</h4>


<h5><a name="giftcard_account.update-Method%3A"></a>Method:</h5>

<ul>
	<li>giftcard_account.update (SOAP V1)</li>
	<li>giftcardAccountUpdate (SOAP V2)</li>
</ul>


<p>Allows you to update the required gift card account.</p>

<p><b>Arguments:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> string </td>
<td> sessionId </td>
<td> Session ID </td>
</tr>
<tr>
<td> string </td>
<td> giftcardAccountId </td>
<td> Gift card account ID </td>
</tr>
<tr>
<td> array </td>
<td> giftcardData </td>
<td> Array of giftcardAccountEntityToUpdate </td>
</tr>
</tbody></table>


<p><b>Return:</b></p>

<table><tbody>
<tr>
<th> Type </th>
<th> Description </th>
</tr>
<tr>
<td> boolean </td>
<td> True is the gift card account is updated </td>
</tr>
</tbody></table>


<p>The <b>giftcardAccountEntityToUpdate</b> content is as follows:</p>

<table><tbody>
<tr>
<th> Type </th>
<th> Name </th>
<th> Description </th>
</tr>
<tr>
<td> boolean </td>
<td> is_active <br class="atl-forced-newline" /> </td>
<td> Defines whether the gift card account is active </td>
</tr>
<tr>
<td> boolean </td>
<td> is_redeemable <br class="atl-forced-newline" /> </td>
<td> Defines whether the gift card account is redeemable </td>
</tr>
<tr>
<td> int </td>
<td> store_id <br class="atl-forced-newline" /> </td>
<td> Store view ID </td>
</tr>
<tr>
<td> double </td>
<td> balance <br class="atl-forced-newline" /> </td>
<td> Gift card account initial balance </td>
</tr>
<tr>
<td> string </td>
<td> date_expires <br class="atl-forced-newline" /> </td>
<td> Expiration date in the YYYY-MM-DD format </td>
</tr>
</tbody></table>



<p><b>Faults:</b></p>


<table><tbody>
<tr>
<th> Fault Code </th>
<th> Fault Message </th>
</tr>
<tr>
<td> 102 </td>
<td> Unable to save data. </td>
</tr>
</tbody></table>


<h4><a name="giftcard_account.update-Examples"></a>Examples</h4>

<h5><a name="giftcard_account.update-RequestExampleSOAPV1"></a>Request Example SOAP V1</h5>


<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy-&gt;login('apiUser', 'apiKey');

$giftcardId = 1;
$giftcardToUpdate = array(
    "balance" =&gt; 700
);

$result = $proxy-&gt;call(
    $sessionId,
    "giftcard_account.update",
    array(
         $giftcardId,
         $giftcardToUpdate
    )
);</pre>
		</div>
</div></div>


<h5><a name="giftcard_account.update-RequestExampleSOAPV2"></a>Request Example SOAP V2</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); 

$sessionId = $proxy-&gt;login('apiUser', 'apiKey'); 
 
$result = $proxy-&gt;giftcardAccountUpdate($sessionId, '3', array(
'date_expires' =&gt; null, 
'store_id' =&gt; '2', 
'balance' =&gt; '700', 
'is_active' =&gt; TRUE, 
'is_redeemable' =&gt; TRUE));   

var_dump($result);</pre>
		</div>
</div></div>



<h5><a name="giftcard_account.update-RequestExampleSOAPV2%28WSIComplianceMode%29"></a>Request Example SOAP V2 (WS-I Compliance Mode)</h5>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<div id="root">
		<pre class="theme: Default; brush: php; gutter: false">$proxy = new SoapClient('http://magentohost/api/v2_soap/?wsdl'); 

$sessionId = $proxy-&gt;login((object)array('username' =&gt; 'apiUser', 'apiKey' =&gt; 'apiKey')); 
 
$result = $proxy-&gt;giftcardAccountUpdate((object)array('sessionId' =&gt; $sessionId-&gt;result, 'giftcardAccountId' =&gt; '3', 'giftcardData' =&gt; array(
'balance' =&gt; '700',
'is_active' =&gt; TRUE,
'is_redeemable' =&gt; TRUE,
'store_id' =&gt; '2',
'date_expires' =&gt; null)));   

var_dump($result-&gt;result);</pre>
		</div>
</div></div>

<?php include(__ROOT__ . 'footer.php'); ?>
